import React, { Component } from 'react';
import Card from '../../../components/card';
import './buyerInfo.scss';

interface BuyerInfoCardProps extends CosumerInfo {}

export default class BuyerInfoCard extends Component<BuyerInfoCardProps> {
    cardInfo: { title: string, width: string };
    constructor (props: BuyerInfoCardProps) {
        super(props);
        this.cardInfo = {
            title: '买家信息',
            width: '15%',
        };
    }
    render () {
        const { title, width } = this.cardInfo;
        const { buyerNick, receiverName, receiverMobile, receiverAddress } = this.props;
        return (
            <Card title={title} width={width}>
                {
                    <div className='buyer-info-container'>
                        <a className='buyer-info-font buyer-info-link-font' href="">{buyerNick}</a>
                        <p className='buyer-info-paragraph buyer-info-font'>{receiverName}</p>
                        <p className='buyer-info-paragraph buyer-info-font'>{receiverMobile}</p>
                        <p className='buyer-info-paragraph buyer-info-font'>{receiverAddress}</p>
                    </div>
                }
            </Card>
        );
    }
}
